//
//  PublishTextView.swift
//  WBSwift
//
//  Created by maker on 2016/11/18.
//  Copyright © 2016年 maker. All rights reserved.
//

import UIKit
import SnapKit

class PublishTextView: UITextView {
    lazy var placeHolderLbl = UILabel()
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        setupUI()
    }
    
    override func awakeFromNib() {

    }
    
}

extension PublishTextView {
    
    func setupUI() {
        addSubview(placeHolderLbl)
        
        //布局
        placeHolderLbl.snp_makeConstraints { (make) in
            make.left.equalTo(8)
            make.top.equalTo(10)
        }
        placeHolderLbl.text = "分享新鲜事儿..."
        placeHolderLbl.font = font
        placeHolderLbl.textColor = UIColor.lightGray
        
        //设置textview 的内容边距
        textContainerInset = UIEdgeInsets(top: 9, left: 6, bottom: 0, right: 6)
        
    }
}
